
{extend name="index/admin-index" /}
{block name="main"}
</style>
<link rel="stylesheet" href="/public/static/css/bootstrap.min.css">
  <!-- content start -->
  <div class="admin-content">
    <div class="admin-content-body">
      <div class="am-cf am-padding am-padding-bottom-0">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">版头明星</strong> / <small>star management</small></div>
      </div>

      <hr/>

     
      <div class="am-g">
        <div class="am-u-sm-12 container" >

          <table class="am-table am-table-bd am-table-striped admin-content-table table-hover">
            <thead>

            <tr>
              <th  class="col-md-2">座位</th>
              <th class='col-md-3'>明星</th>
              <th class='col-md-3'>选择</th>
              <th class="col-md-2">操作</th>
              <th class="col-md-3">修改</th>

            </tr>
            </thead>
            <tbody>
            {volist name='star' id='v1'}
            <tr>
            <td>第{$v1.id}栏</td>
            <td>{$v1.name?$v1.name:'暂无明星'}</td>
              <td>
              <form action="ad?id={$v1.id}" method='post' >
                <select name="selec" id="">
                  <option value="">请选择</option>
                  {volist name='user' id='v'}
                  <option value="{$v.id}" class='' id='op'>{$v.id} {$v.nickname}</option>
                  {/volist}

                </select>
              </td>
              <td>
                  <input class='btn btn-success' type="submit" value='确定'>
                  <!-- <span class='btn btn-success' id='sub'>确定</span> -->
              </td>
              </form>
              <td id='del'>
                    <!-- <span em='' class="btn btn-danger " style='color:#fff;'>清空</span> -->
                    <a href="javascript:void(0)" class="btn btn-danger " em={$v1.id} id='dd' style='color:#fff;' >清空</a>
              </td>
            </tr>
                {/volist}
           
            </tbody>
          </table>
        </div>
      </div>

  

    </div>

<a href="#" class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}"></a>
 
<footer>
  <hr>
  <p class="am-padding-left">© 2014 AllMobilize, Inc. Licensed under MIT license.</p>
</footer>
  </div>
  <script src='/public/static/js/jquery.js'></script>
<script>
    $('#del a').click(function(){
          if(confirm('确定清空当前吗')){
            var id = $(this).attr('em');
          $.ajax({
            url:'{:url("admin/Star/del")}',
            type:'post',
            data:{'id':id},
            success:function(d){
              // console.log(d);
              window.location = "{:url('admin/Star/index')}";
            }
          })
          }else{
              window.location = '#';
          }

    })

</script>
{/block}